package com.orion.controller;

import com.orion.service.ApolloService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Administrator
 * @date 2021/10/25
 */
@RestController
@RequestMapping("/apollo")
public class ApolloController {

    @Value("${code.orion}")
    private String orionVal;

    @Value("${code.mitche}")
    private String mitcheVal;

    @Value("${server.port}")
    private Integer port;

    @Resource
    private ApolloService apolloService;

    @GetMapping("/dymChange")
    public String dymChange() {
        return "orion = " + orionVal + " , mitche = " + mitcheVal + " , port = " + port;
    }

    @GetMapping("/providerDymChange")
    public String providerDymChange(){
        return apolloService.dymChange();
    }
}
